package com.yike.user.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 店铺表
 *
 * @author Sakura
 * @since 2024-08-23
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "代理商信息")
public class AgentVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("代理商ID")
    private Long id;

    @ApiModelProperty("上级代理商ID，0为一级代理")
    private Long parentAgentId;

    @ApiModelProperty("上级代理商编号")
    private String parentAgentNo;

    @ApiModelProperty("上级代理商名称")
    private String parentAgentName;

    @ApiModelProperty("代理商编号")
    private String agentNo;

    @ApiModelProperty(value = "代理商名称", required = true)
    private String name;

    @ApiModelProperty(value = "用户编号", required = true)
    private String userNo;

    @ApiModelProperty(value = "联系人", required = true)
    private String contact;

    @ApiModelProperty(value = "联系电话", required = true)
    private String mobile;

    @ApiModelProperty("省code")
    private String provCode;

    @ApiModelProperty("市code")
    private String cityCode;

    @ApiModelProperty("区code")
    private String distCode;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("分佣比例")
    private BigDecimal commissionRate;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("销售额")
    private BigDecimal totalAmount = BigDecimal.ZERO;

    @ApiModelProperty("实收")
    private BigDecimal actualAmount = BigDecimal.ZERO;

    @ApiModelProperty("分佣")
    private BigDecimal totalCommission = BigDecimal.ZERO;

    @ApiModelProperty("下级代理数")
    private Integer agentNumber = 0;

    @ApiModelProperty("新增代理数")
    private Integer addAgentNumber = 0;

    @ApiModelProperty("订单量")
    private Integer orderNumber = 0;
}
